﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditUserControl.ascx.cs"
    Inherits="LenderClearingHouse.EditUserControl" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<style type="text/css">
    .style2
    {
        width: 146px;
    }
    .style3
    {
        width: 164px;
    }
</style>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="100%">
    <table cellspacing="1" cellpadding="1" width="100%" border="0">
        <tr>
            <td width="50%" valign="top">
                <fieldset>
                    <legend>Personal Info</legend>
                    <table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
                        <tr>
                            <td class="style2">
                                First&nbsp;Name:
                            </td>
                            <td style="padding-left: 20px" class="style3">
                                <asp:TextBox ID="tbFirstName" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Fname" ) %>'
                                    TextMode="SingleLine"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="tbFirstName"
                                    ErrorMessage="First Name is required" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Last&nbsp;Name:
                            </td>
                            <td style="padding-left: 20px" class="style3">
                                <asp:TextBox ID="tbLastName" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Lname" ) %>'></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="tbLastName"
                                    ErrorMessage="Last Name is required" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Email:
                            </td>
                            <td style="padding-left: 20px" class="style3">
                                <asp:TextBox ID="tbEmail" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Email" ) %>'></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbEmail"
                                    ErrorMessage="Email is required" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="tbEmail"
                                    Display="Dynamic" ErrorMessage="Invalid email" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                    ForeColor="Red"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Password:
                            </td>
                            <td style="padding-left: 20px" class="style3">
                                <asp:TextBox ID="tbPassword" runat="server" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Confirm&nbsp;password:
                            </td>
                            <td style="padding-left: 20px" class="style3">
                                <asp:TextBox ID="tbConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                                <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToCompare="tbPassword"
                                    ControlToValidate="tbConfirmPassword" Display="Dynamic" ErrorMessage="Password and Confirm Password values do not match"
                                    ForeColor="Red"></asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Active:
                            </td>
                            <td style="padding-left: 20px" class="style3">
                                <asp:CheckBox ID="cbActive" runat="server" Checked="True" AutoPostBack="True" OnCheckedChanged="cbIsAdmin_CheckedChanged" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </td>
            <td width="50%" valign="top">
                <fieldset>
                    <legend>Access Rights</legend>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <asp:RadioButton ID="rbSuperAdmin" runat="server" Text="Super Admin" AutoPostBack="True"
                                    GroupName="ar" Checked="True" OnCheckedChanged="rbSuperAdmin_CheckedChanged" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="rbInvestorAdmin" runat="server" Text="Investor Admin" AutoPostBack="True"
                                    GroupName="ar" OnCheckedChanged="rbSuperAdmin_CheckedChanged" />
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlInvestorAdminRole" runat="server" Visible="False">
                                    <asp:ListItem Value="L">LVReo Admin</asp:ListItem>
                                    <asp:ListItem Value="S">SDReo Admin</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="rbInvestor" runat="server" Text="Investor" AutoPostBack="True"
                                    GroupName="ar" OnCheckedChanged="rbSuperAdmin_CheckedChanged" />
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlInvestorRole" runat="server" Visible="False" 
                                    AutoPostBack="True" 
                                    onselectedindexchanged="ddlInvestorRole_SelectedIndexChanged">
                                    <asp:ListItem Value="L">LVReo Investor</asp:ListItem>
                                    <asp:ListItem Value="S">SDReo Investor</asp:ListItem>
                                </asp:DropDownList>&nbsp;&nbsp;<asp:Label ID="lbAdminText" runat="server" 
                                    Text="Admin:"></asp:Label>&nbsp;
                                <asp:DropDownList ID="ddlInvestorAdmin" runat="server" Visible="False">
                                </asp:DropDownList>&nbsp;
                                <asp:CheckBox ID="cbVIP" runat="server" Text="VIP" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="rbUser" runat="server" Text="User" AutoPostBack="True" GroupName="ar"
                                    OnCheckedChanged="rbSuperAdmin_CheckedChanged" />
                            </td>
                            <td>
                                <table border="0" cellpadding="0" cellspacing="0" id="tblUserRoles" runat="server"
                                    visible="False">
                                    <tr>
                                        <td>
                                            LVReo&nbsp;Role
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlLvreoRole" runat="server" Width="100px">
                                                <asp:ListItem Value="NA">No Access</asp:ListItem>
                                                <asp:ListItem Value="RO">Read Only</asp:ListItem>
                                                <asp:ListItem Value="RW">Read Write</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            SDReo&nbsp;Role
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlSdreoRole" runat="server" Width="100px">
                                                <asp:ListItem Value="NA">No Access</asp:ListItem>
                                                <asp:ListItem Value="RO">Read Only</asp:ListItem>
                                                <asp:ListItem Value="RW">Read Write</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Master&nbsp;List&nbsp;Role&nbsp;
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlMasterlist" runat="server" Width="100px">
                                                <asp:ListItem Value="NA">No Access</asp:ListItem>
                                                <asp:ListItem Value="RO">Read Only</asp:ListItem>
                                                <asp:ListItem Value="RW">Read Write</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="rbEscrowUser" runat="server" AutoPostBack="True" 
                                    GroupName="ar" OnCheckedChanged="rbSuperAdmin_CheckedChanged" 
                                    Text="Escrow User" />
                            </td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="rbProjectManager" runat="server" AutoPostBack="True" 
                                    GroupName="ar" OnCheckedChanged="rbSuperAdmin_CheckedChanged" 
                                    Text="GC" />
                            </td>
                            <td>&nbsp;</td>
                        </tr>
                    </table>
                </fieldset>
            </td>
        </tr>
    </table>
</telerik:RadAjaxPanel>
<table>
    <tr>
        <td align="left" colspan="4" style="padding-left: 20px; padding-top: 10px;">
            <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>'>
            </asp:Button>
            <asp:Button ID="btnInsert" Text="Insert" runat="server" CommandName="PerformInsert"
                Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>'></asp:Button>
            &nbsp;
            <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                CommandName="Cancel"></asp:Button>
        </td>
    </tr>
</table>
<asp:HiddenField ID="hfUserId" runat="server" Value='<%# DataBinder.Eval( Container, "DataItem.UserID" ) %>' />
